package com.coffee.order.service.sku.dao;

import com.coffee.order.api.sku.query.PeriodizationSkuQuery;
import com.coffee.order.service.sku.bean.PeriodizationSku;
import com.coffee.order.service.sku.bean.RlSku;
import com.coffee.sku.api.sku.req.MerchantSkuListReq;
import com.coffee.sku.api.sku.req.SkuListReq;
import com.coffee.sku.api.sku.result.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PeriodizationSkuDao {
    public PeriodizationSku findById(Integer id);

    public PeriodizationSku findBySkuId(Integer skuId);

    public PeriodizationSku findByIdForUpdate(Integer id);

    public List<PeriodizationSku> findByIds(@Param("idList") List<Integer> idList);

    public Integer count(@Param("param") SkuListReq param);

    public List<PeriodizationSkuListResult> page(@Param("param") SkuListReq param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public PeriodizationSkuDetailResult getDetail(@Param("param") SkuListReq param);

    public List<Integer> listSkuId();

    public PeriodizationSku findFirst(@Param("param") PeriodizationSkuQuery param);

    public Integer insert(PeriodizationSku param);

    Integer insertBatch(List<PeriodizationSku> list);

    Integer insertRlSku(List<RlSku> list);

    public void updateById(@Param("param") PeriodizationSku param);

    public void updateBySkuId(@Param("param") PeriodizationSku param);

    public void updateHostSkuId(@Param("oldSkuId") Integer oldSkuId, @Param("newSkuId") Integer newSkuId);

    public Integer deleteById(Integer id);

    public Integer deleteBySkuId(Integer skuId);

    public Integer deleteByIds(List<Integer> idList);

    public Integer deleteRlSkuByIds(@Param("idList") List<Integer> idList, @Param("hostSkuId") Integer hostSkuId);

    public List<Integer> findSkuIds();

    public List<Integer> findViceSkuIds(@Param("hostSkuId") Integer hostSkuId);

    public Integer findRlSkuvice(Integer skuId);

    public Integer findCountRlSkuByHostSkuId(Integer skuId);

    public List<PeriodizationViceSkuDetailResult> viceSkuList(@Param("param") SkuListReq param);

    public List<MerchantSkuListResult> merchantSkuList(@Param("param") MerchantSkuListReq param);

}